#include<bits/stdc++.h>
using namespace std;
    int n,ans;
    int a[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
    sort(a+1,a+n+1);
    int s=0;
    for(int i=1;i<=n;i++){
        if(i!=1&&a[i]==a[i-1])ans=max(0,ans-1),s++;
        else ans+=s,ans=max(0,ans-1),s=1;
    }
    ans+=s;
    printf("%d",ans);

    return 0;
}